<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>忘记密码</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="EXTENT_PATH/css/style.css"/>
	<link rel="stylesheet" type="text/css" href="EXTENT_PATH/css/pulicstyle.css"/>
	<script type="text/javascript" src="EXTENT_PATH/js/jquery.js"></script>
	<script type="text/javascript" src="EXTENT_PATH/js/jquery.form.js"></script>

  </head>
  <script type="text/javascript">
  	window.onload = function() {
	var verifyObj = document.getElementById("Verify");
	verifyObj.onclick = function() {
		this.src = "VerifyCodeServlet";
	};
}
	$(document).ready(function() {
		$("#submit").click(function() {
			var email = $("#email").val();
			var vf=$("#VerifyCode").val();
			var pattern = /^[\w]{1}[\w\.\-_]*@[\w]{1}[\w\-_\.]*\.[\w]{2,4}$/i;
			if (email == '' || vf=='') {
				$("#notice").html("<font color='red'>邮箱和验证码不能为空!</font>");
				return false;
			} else if(!pattern.test(email)){
				$("#notice").html("<font color='red'>邮箱格式不对!</font>");
				return false;
			}else {
				$("#notice").html("");
				//$("#findpassword").attr("action", "findPassword/FindPassword");
				//$("#findpassword").ajaxSubmit(options);
				return true;
			}

		});
	});
</script>
  <body>
   <center>
		<jsp:include page="../common/top.jsp"></jsp:include>
			<div id="wrapper">
			<FORM id="findpassword" name="findpassword" action="findPassword/FindPassword" method="post">
				<BR>
				<center>
				<STRONG><h1><font color="red">${requestScope.msg}</font></h1></h1></STRONG>
				<center><STRONG><h1>找回密码</h1></STRONG></center>
				<center><STRONG id="notice"></STRONG></center>
				<TABLE width="40%" align=center border=0>
						<tr>
							<td><div align="right">注册邮箱：</div>
							</td>
							<td><div align="left">
									<input type="text" name="email" id="email" value=""
										class="inputindex" />
								</div>
							</td>
						</tr>
						<TR>
							<TD align=right>请输入验证码:
							</TD>
							<TD>
								<input type="text" id="VerifyCode" size="3" name="vf" class="inputindex">
								<img src="VerifyCodeServlet" id="Verify" style="cursor: hand;" alt="看不清，换一张" />
								<SPAN id="VerifyCode_notice"><font color="red">*</font></SPAN>
							</TD>
						</TR>
						<tr>
						<td><div align="right"></div>
							</td>
							<td><div align="center">
									<input type=submit value="找回" name="Submit1" id="submit">
								</div>
							</td>
						</tr>
					</table>
					
				</center>
				</FORM>
			</div>
	
  </body>
</html>
